package com.taptech.doufu.ui.view.theme.read;

import android.util.SparseArray;

import com.taptech.doufu.R;
import com.taptech.doufu.app.WeMediaApplication;
import com.taptech.doufu.constant.SharedPreferencesKey;
import com.taptech.doufu.util.sp.DiaoBaoSharedPreferences;
import com.taptech.doufu.ui.view.theme.ThemeType;

/**
 * Created by Wyatt on 2017/11/25/025.
 */

public class ReadThemeHelper {
    private static ReadTheme readTheme;

    public static ReadTheme getReadTheme() {
        if (readTheme == null) {
            boolean isNight = WeMediaApplication.getInstance().isDayNightMode_Night;
            if(isNight){
                readTheme = getTheme(ThemeType.TYPE_NIGHT);
            }else{
                int themeType = DiaoBaoSharedPreferences.getSharedPreferencesValueToInt(SharedPreferencesKey.SP_READ_PAGE_THEME_STYTE,
                        WeMediaApplication.applicationContext, ThemeType.TYPE_DAY);
                readTheme = getTheme(themeType);
            }
        }
        return readTheme;
    }



    public static void clearTheme() {
        if (readTheme != null) {
            readTheme = null;
        }
    }


    public static ReadTheme updataReadTheme(int type) {
        readTheme = getTheme(type);
        DiaoBaoSharedPreferences.setSharedPreferencesValueToInt(SharedPreferencesKey.SP_READ_PAGE_THEME_STYTE,
                type,WeMediaApplication.applicationContext);
        return readTheme;
    }


    /**
     * 判断背景是否为图片
     * @param readTheme
     * @return
     */
    public static boolean bgIsPicture(ReadTheme readTheme) {
        if (readTheme.getThemeType() == ThemeType.TYPE_BOOK_BUFF ||
                readTheme.getThemeType() == ThemeType.TYPE_BOOK_WHITE ||
                readTheme.getThemeType() == ThemeType.TYPE_BOOK_RED) {
            return true;
        }else {
            return false;
        }
    }

    private static ReadTheme getTheme(int type) {
        ReadTheme readTheme;
        switch (type) {
            case ThemeType.TYPE_DAY:
                readTheme = getThemeDay(type);
                break;
            case ThemeType.TYPE_NIGHT:
                readTheme = getThemeNight(type);
                break;
            case ThemeType.TYPE_AQUA:
                readTheme = getThemeAquq(type);
                break;
            case ThemeType.TYPE_BLUE:
                readTheme = getThemeBlue(type);
                break;
            case ThemeType.TYPE_RED:
                readTheme = getThemeRed(type);
                break;
            case ThemeType.TYPE_BUFF:
                readTheme = getThemeBuff(type);
                break;
            case ThemeType.TYPE_BOOK_WHITE:
                readTheme = getThemeBookWhite(type);
                break;
            case ThemeType.TYPE_BOOK_BUFF:
                readTheme = getThemeBookBuff(type);
                break;
            case ThemeType.TYPE_BOOK_RED:
                readTheme = getThemeBookRed(type);
                break;
            default:
                readTheme = getThemeDay(ThemeType.TYPE_DAY);
        }
        return readTheme;
    }

    public static ReadTheme getThemeDay(int type) {
        ReadTheme.TopMenuTheme topMenuTheme = new ReadTheme.TopMenuTheme(
                R.drawable.activity_new_back,R.drawable.read_off_line,
                R.drawable.read_gift,R.drawable.read_other_more);
        ReadTheme.BottomMenuTheme bottomMenuTheme = new ReadTheme.BottomMenuTheme(
                R.drawable.read_previous_chapter,R.drawable.read_next_chapter,
                R.drawable.read_catalog,R.drawable.read_night_st,
                R.drawable.read_setup,R.drawable.read_scomment,
                R.color.read_desc_font_color_day,
                R.drawable.biankuang_novel_des_comment_day,R.color.read_red_dot_font_color_day);
        ReadTheme.SecondMenuTheme secondMenuTheme = new ReadTheme.SecondMenuTheme(
                R.drawable.read_brightness_reduce,R.drawable.read_brightness_increase,
                R.drawable.read_font_size_add,R.drawable.read_font_size_sub,
                R.drawable.read_flip,R.drawable.read_eye,
                R.drawable.read_play,R.drawable.read_other_more,
                R.color.read_desc_font_color_day,1.0f,R.color.read_sys_light_select_font_color_day,
                R.color.read_sys_light_unselect_font_color_day,R.drawable.read_sys_light_bg_day);
        ReadTheme.MoreOperationTheme moreOperationTheme = new ReadTheme.MoreOperationTheme(R.drawable.read_more_eject,
                R.drawable.read_more_collection_st,
                R.drawable.read_more_collection,R.drawable.read_more_share,
                R.drawable.read_more_report,R.drawable.read_more_details,R.color.read_desc_font_color_day);
        ReadTheme.PayTheme payTheme = new ReadTheme.PayTheme(R.color.read_pay_desc_font_color_day,
                R.drawable.ugc_original_pic_default,R.drawable.ugc_original_pic_select,R.drawable.radius_attention_circle_red2,
                R.color.read_pay_btn_font_color_day,R.color.read_pay_other_price_font_color_day,1.0f,
                R.drawable.radius_attention_circle_red_stroke,R.color.text_color_57);
        ReadTheme.BatteryTheme batteryTheme = new ReadTheme.BatteryTheme(R.drawable.read__electricity_1,
                R.drawable.read__electricity_2, R.drawable.read__electricity_3, R.drawable.read__electricity_4,
                R.drawable.read__electricity_5, R.drawable.read__electricity_6, R.drawable.read__electricity_c);
        ReadTheme.AutoPlayTheme autoPlayTheme = new ReadTheme.AutoPlayTheme(R.color.read_auto_play_title_font_color_day,
                R.color.read_auto_play_select_font_color_day,R.color.read_auto_play_unselect_font_color_day,
                R.color.read_auto_play_nomal_font_color_day,R.color.read_red_dot_bg_day);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        return new ReadTheme(type,R.color.read_menu_bg_color_day,R.color.read_content_bg_color_day,
                R.color.read_content_font_color_day,R.color.read_title_font_color_day,R.color.read_status_bar_font_color_day,
                R.color.read_line_color_day,
                R.drawable.seekbar_style_read,R.drawable.read_process,topMenuTheme,
                bottomMenuTheme,secondMenuTheme,moreOperationTheme,themeSelectArray,
                R.drawable.read_selected,R.color.read_eyes_view_color,payTheme,1.0f,batteryTheme,
                autoPlayTheme,R.color.read_content_bg_color_day);

    }

    public static ReadTheme getThemeNight(int type) {
        ReadTheme.TopMenuTheme topMenuTheme = new ReadTheme.TopMenuTheme(
                R.drawable.activity_new_back_night,R.drawable.read_off_line_night,
                R.drawable.read_gift_night,R.drawable.read_other_more_night);
        ReadTheme.BottomMenuTheme bottomMenuTheme = new ReadTheme.BottomMenuTheme(
                R.drawable.read_previous_chapter_night,R.drawable.read_next_chapter_night,
                R.drawable.read_catalog_nignt,R.drawable.read_day_st,
                R.drawable.read_setup_night,R.drawable.read_scomment_night,
                R.color.read_desc_font_color_night,
                R.drawable.biankuang_novel_des_comment_night,R.color.read_red_dot_font_color_night);
        ReadTheme.SecondMenuTheme secondMenuTheme = new ReadTheme.SecondMenuTheme(
                R.drawable.read_brightness_increase_night,R.drawable.read_brightness_reduce_increase,
                R.drawable.read_font_size_add_night,R.drawable.read_font_size_sub_night,
                R.drawable.read_flip_night,R.drawable.read_eye_night,
                R.drawable.read_play_night,R.drawable.read_other_more_night,
                R.color.read_desc_font_color_night,0.5f,R.color.read_sys_light_select_font_color_night,
                R.color.read_sys_light_unselect_font_color_night,R.drawable.read_sys_light_bg_night);
        ReadTheme.MoreOperationTheme moreOperationTheme = new ReadTheme.MoreOperationTheme(R.drawable.read_more_eject_night,
                R.drawable.read_more_collection_st,
                R.drawable.read_more_collection_night,R.drawable.read_more_share_night,
                R.drawable.read_more_report_night,R.drawable.read_more_details_night,R.color.read_desc_font_color_night);
        ReadTheme.PayTheme payTheme = new ReadTheme.PayTheme(R.color.read_pay_desc_font_color_day,
                R.drawable.ugc_original_pic_default_night,R.drawable.ugc_original_pic_select_night,R.drawable.radius_attention_circle_red2_dark,
                R.color.read_pay_btn_font_color_night,R.color.read_pay_other_price_font_color_night,0.5f,
                R.drawable.radius_attention_circle_red_stroke_dark,R.color.read_sys_light_select_font_color_night);
        ReadTheme.BatteryTheme batteryTheme = new ReadTheme.BatteryTheme(R.drawable.read__electricity_1_night,
                R.drawable.read__electricity_2_night, R.drawable.read__electricity_3_night, R.drawable.read__electricity_4_night,
                R.drawable.read__electricity_5_night, R.drawable.read__electricity_6_night, R.drawable.read__electricity_c_night);
        ReadTheme.AutoPlayTheme autoPlayTheme = new ReadTheme.AutoPlayTheme(R.color.read_auto_play_title_font_color_night,
                R.color.read_auto_play_select_font_color_night,R.color.read_auto_play_unselect_font_color_night,
                R.color.read_auto_play_nomal_font_color_night,R.color.read_red_dot_bg_night);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        return new ReadTheme(type,R.color.read_menu_bg_color_night,R.color.read_content_bg_color_night,
                R.color.read_content_font_color_night,R.color.read_title_font_color_night,R.color.read_status_bar_font_color_night,
                R.color.read_line_color_night,
                R.drawable.seekbar_style_read_night,R.drawable.read_process_night,topMenuTheme,
                bottomMenuTheme,secondMenuTheme,moreOperationTheme,themeSelectArray,
                R.drawable.read_selected,R.color.read_eyes_view_color,payTheme,1.0f,batteryTheme,
                autoPlayTheme,R.color.read_content_bg_color_night);

    }

    /**
     * 浅绿色主题
     * @param type
     * @return
     */
    public static ReadTheme getThemeAquq(int type) {
        ReadTheme.TopMenuTheme topMenuTheme = new ReadTheme.TopMenuTheme(
                R.drawable.activity_new_back_aqua,R.drawable.read_off_line_aqua,
                R.drawable.read_gift_aqua,R.drawable.read_other_more_aqua);
        ReadTheme.BottomMenuTheme bottomMenuTheme = new ReadTheme.BottomMenuTheme(
                R.drawable.read_previous_chapter_aqua,R.drawable.read_next_chapter_aqua,
                R.drawable.read_catalog_aqua,R.drawable.read_night_st_aqua,
                R.drawable.read_setup_aqua,R.drawable.read_scomment_aqua,
                R.color.read_desc_font_color_aqua,
                R.drawable.biankuang_novel_des_comment_aqua,R.color.read_red_dot_font_color_aqua);
        ReadTheme.SecondMenuTheme secondMenuTheme = new ReadTheme.SecondMenuTheme(
                R.drawable.read_brightness_reduce_aqua,R.drawable.read_brightness_increase_aqua,
                R.drawable.read_font_size_add_aqua,R.drawable.read_font_size_sub_aqua,
                R.drawable.read_flip_aqua,R.drawable.read_eye_aqua,
                R.drawable.read_play_aqua,R.drawable.read_other_more_aqua,
                R.color.read_desc_font_color_aqua,1.0f,R.color.read_sys_light_select_font_color_aqua,
                R.color.read_sys_light_unselect_font_color_aqua,R.drawable.read_sys_light_bg_aqua);
        ReadTheme.MoreOperationTheme moreOperationTheme = new ReadTheme.MoreOperationTheme(R.drawable.read_more_eject_aqua,
                R.drawable.read_more_collection_st_aqua,
                R.drawable.read_more_collection_aqua,R.drawable.read_more_share_aqua,
                R.drawable.read_more_report_aqua,R.drawable.read_more_details_aqua,R.color.read_desc_font_color_aqua);
        ReadTheme.PayTheme payTheme = new ReadTheme.PayTheme(R.color.read_pay_desc_font_color_aqua,
                R.drawable.ugc_original_pic_default_aqua,R.drawable.ugc_original_pic_select_aqua,R.drawable.radius_attention_circle_aqua,
                R.color.read_pay_btn_font_color_aqua,R.color.read_pay_other_price_font_color_aqua,0.5f,
                R.drawable.radius_attention_circle_aquq_stroke,R.color.read_pay_other_price_font_color_aqua);
        ReadTheme.BatteryTheme batteryTheme = new ReadTheme.BatteryTheme(R.drawable.read__electricity_1_lightgreen,
                R.drawable.read__electricity_2_lightgreen, R.drawable.read__electricity_3_lightgreen, R.drawable.read__electricity_4_lightgreen,
                R.drawable.read__electricity_5_lightgreen, R.drawable.read__electricity_6_lightgreen, R.drawable.read__electricity_c_lightgreen);
        ReadTheme.AutoPlayTheme autoPlayTheme = new ReadTheme.AutoPlayTheme(R.color.read_auto_play_title_font_color_aqua,
                R.color.read_auto_play_select_font_color_aqua,R.color.read_auto_play_unselect_font_color_aqua,
                R.color.read_auto_play_nomal_font_color_aqua,R.color.read_red_dot_bg_aqua);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        return new ReadTheme(type,R.color.read_menu_bg_color_aqua,R.color.read_content_bg_color_aqua,
                R.color.read_content_font_color_aqua,R.color.read_title_font_color_aqua,R.color.read_status_bar_font_color_aqua,
                R.color.read_line_color_aqua,
                R.drawable.seekbar_style_read_aqua,R.drawable.read_process_aqua,topMenuTheme,
                bottomMenuTheme,secondMenuTheme,moreOperationTheme,themeSelectArray,
                R.drawable.read_selected_aqua,R.color.read_eyes_view_color,payTheme,0.5f,batteryTheme,
                autoPlayTheme,R.color.read_content_bg_color_aqua);
    }



    /**
     * 浅黄色主题
     * @param type
     * @return
     */
    public static ReadTheme getThemeBuff(int type) {
        ReadTheme.TopMenuTheme topMenuTheme = new ReadTheme.TopMenuTheme(
                R.drawable.activity_new_back_buff,R.drawable.read_off_line_buff,
                R.drawable.read_gift_buff,R.drawable.read_other_more_buff);
        ReadTheme.BottomMenuTheme bottomMenuTheme = new ReadTheme.BottomMenuTheme(
                R.drawable.read_previous_chapter_buff,R.drawable.read_next_chapter_buff,
                R.drawable.read_catalog_buff,R.drawable.read_night_st_buff,
                R.drawable.read_setup_buff,R.drawable.read_scomment_buff,
                R.color.read_desc_font_color_buff,
                R.drawable.biankuang_novel_des_comment_buff,R.color.read_red_dot_font_color_buff);
        ReadTheme.SecondMenuTheme secondMenuTheme = new ReadTheme.SecondMenuTheme(
                R.drawable.read_brightness_reduce_buff,R.drawable.read_brightness_increase_buff,
                R.drawable.read_font_size_add_buff,R.drawable.read_font_size_sub_buff,
                R.drawable.read_flip_buff,R.drawable.read_eye_buff,
                R.drawable.read_play_buff,R.drawable.read_other_more_buff,
                R.color.read_desc_font_color_buff,1.0f,R.color.read_sys_light_select_font_color_buff,
                R.color.read_sys_light_unselect_font_color_buff,R.drawable.read_sys_light_bg_buff);
        ReadTheme.MoreOperationTheme moreOperationTheme = new ReadTheme.MoreOperationTheme(R.drawable.read_more_eject_buff,
                R.drawable.read_more_collection_st_buff,
                R.drawable.read_more_collection_buff,R.drawable.read_more_share_buff,
                R.drawable.read_more_report_buff,R.drawable.read_more_details_buff,R.color.read_desc_font_color_buff);
        ReadTheme.PayTheme payTheme = new ReadTheme.PayTheme(R.color.read_pay_desc_font_color_buff,
                R.drawable.ugc_original_pic_default_buff,R.drawable.ugc_original_pic_select_buff,R.drawable.radius_attention_circle_buff,
                R.color.read_pay_btn_font_color_buff,R.color.read_pay_other_price_font_color_buff,0.5f,
                R.drawable.radius_attention_circle_buff_stroke,R.color.read_pay_other_price_font_color_buff);
        ReadTheme.BatteryTheme batteryTheme = new ReadTheme.BatteryTheme(R.drawable.read__electricity_1_yellow,
                R.drawable.read__electricity_2_yellow, R.drawable.read__electricity_3_yellow, R.drawable.read__electricity_4_yellow,
                R.drawable.read__electricity_5_yellow, R.drawable.read__electricity_6_yellow, R.drawable.read__electricity_c_yellow );
        ReadTheme.AutoPlayTheme autoPlayTheme = new ReadTheme.AutoPlayTheme(R.color.read_auto_play_title_font_color_buff,
                R.color.read_auto_play_select_font_color_buff,R.color.read_auto_play_unselect_font_color_buff,
                R.color.read_auto_play_nomal_font_color_buff,R.color.read_red_dot_bg_buff);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        return new ReadTheme(type,R.color.read_menu_bg_color_buff,R.color.read_content_bg_color_buff,
                R.color.read_content_font_color_buff,R.color.read_title_font_color_buff,R.color.read_status_bar_font_color_buff,
                R.color.read_line_color_buff,
                R.drawable.seekbar_style_read_buff,R.drawable.read_process_buff,topMenuTheme,
                bottomMenuTheme,secondMenuTheme,moreOperationTheme,themeSelectArray,
                R.drawable.read_selected_buff,R.color.read_eyes_view_color,payTheme,1.0f,batteryTheme,
                autoPlayTheme,R.color.read_content_bg_color_buff);

    }

    /**
     * 浅蓝色主题
     * @param type
     * @return
     */
    public static ReadTheme getThemeBlue(int type) {
        ReadTheme.TopMenuTheme topMenuTheme = new ReadTheme.TopMenuTheme(
                R.drawable.activity_new_back_blue,R.drawable.read_off_line_blue,
                R.drawable.read_gift_blue,R.drawable.read_other_more_blue);
        ReadTheme.BottomMenuTheme bottomMenuTheme = new ReadTheme.BottomMenuTheme(
                R.drawable.read_previous_chapter_blue,R.drawable.read_next_chapter_blue,
                R.drawable.read_catalog_blue,R.drawable.read_night_st_blue,
                R.drawable.read_setup_blue,R.drawable.read_scomment_blue,
                R.color.read_desc_font_color_blue,
                R.drawable.biankuang_novel_des_comment_blue,R.color.read_red_dot_font_color_blue);
        ReadTheme.SecondMenuTheme secondMenuTheme = new ReadTheme.SecondMenuTheme(
                R.drawable.read_brightness_reduce_blue,R.drawable.read_brightness_increase_blue,
                R.drawable.read_font_size_add_blue,R.drawable.read_font_size_sub_blue,
                R.drawable.read_flip_blue,R.drawable.read_eye_blue,
                R.drawable.read_play_blue,R.drawable.read_other_more_blue,
                R.color.read_desc_font_color_blue,1.0f,R.color.read_sys_light_select_font_color_blue,
                R.color.read_sys_light_unselect_font_color_blue,R.drawable.read_sys_light_bg_blue);
        ReadTheme.MoreOperationTheme moreOperationTheme = new ReadTheme.MoreOperationTheme(R.drawable.read_more_eject_blue,
                R.drawable.read_more_collection_st_blue,
                R.drawable.read_more_collection_blue,R.drawable.read_more_share_blue,
                R.drawable.read_more_report_blue,R.drawable.read_more_details_blue,R.color.read_desc_font_color_blue);
        ReadTheme.PayTheme payTheme = new ReadTheme.PayTheme(R.color.read_pay_desc_font_color_blue,
                R.drawable.ugc_original_pic_default_blue,R.drawable.ugc_original_pic_select_blue,R.drawable.radius_attention_circle_blue2,
                R.color.read_pay_btn_font_color_blue,R.color.read_pay_other_price_font_color_blue,0.5f,
                R.drawable.radius_attention_circle_aquq_stroke,R.color.read_pay_other_price_font_color_aqua);
        ReadTheme.BatteryTheme batteryTheme = new ReadTheme.BatteryTheme(R.drawable.read__electricity_1_lightblue,
                R.drawable.read__electricity_2_lightblue, R.drawable.read__electricity_3_lightblue, R.drawable.read__electricity_4_lightblue,
                R.drawable.read__electricity_5_lightblue, R.drawable.read__electricity_6_lightblue, R.drawable.read__electricity_c_lightblue);
        ReadTheme.AutoPlayTheme autoPlayTheme = new ReadTheme.AutoPlayTheme(R.color.read_auto_play_title_font_color_blue,
                R.color.read_auto_play_select_font_color_blue,R.color.read_auto_play_unselect_font_color_blue,
                R.color.read_auto_play_nomal_font_color_blue,R.color.read_red_dot_bg_blue);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        return new ReadTheme(type,R.color.read_menu_bg_color_blue,R.color.read_content_bg_color_blue,
                R.color.read_content_font_color_blue,R.color.read_title_font_color_blue,R.color.read_status_bar_font_color_blue,
                R.color.read_line_color_blue,
                R.drawable.seekbar_style_read_blue,R.drawable.read_process_blue,topMenuTheme,
                bottomMenuTheme,secondMenuTheme,moreOperationTheme,themeSelectArray,
                R.drawable.read_selected_blue,R.color.read_eyes_view_color,payTheme,1.0f,batteryTheme,
                autoPlayTheme,R.color.read_content_bg_color_blue);
    }
    /**
     * 仿真白纸质主题
     * @param type
     * @return
     */
    public static ReadTheme getThemeBookWhite(int type) {
        ReadTheme.TopMenuTheme topMenuTheme = new ReadTheme.TopMenuTheme(
                R.drawable.activity_new_back,R.drawable.read_off_line,
                R.drawable.read_gift,R.drawable.read_other_more);
        ReadTheme.BottomMenuTheme bottomMenuTheme = new ReadTheme.BottomMenuTheme(
                R.drawable.read_previous_chapter,R.drawable.read_next_chapter,
                R.drawable.read_catalog,R.drawable.read_night_st,
                R.drawable.read_setup,R.drawable.read_scomment,
                R.color.read_desc_font_color_day,
                R.drawable.biankuang_novel_des_comment_day,R.color.read_red_dot_font_color_day);
        ReadTheme.SecondMenuTheme secondMenuTheme = new ReadTheme.SecondMenuTheme(
                R.drawable.read_brightness_reduce,R.drawable.read_brightness_increase,
                R.drawable.read_font_size_add,R.drawable.read_font_size_sub,
                R.drawable.read_flip,R.drawable.read_eye,
                R.drawable.read_play,R.drawable.read_other_more,
                R.color.read_desc_font_color_day,1.0f,R.color.read_sys_light_select_font_color_day,
                R.color.read_sys_light_unselect_font_color_day,R.drawable.read_sys_light_bg_day);
        ReadTheme.MoreOperationTheme moreOperationTheme = new ReadTheme.MoreOperationTheme(R.drawable.read_more_eject,
                R.drawable.read_more_collection_st,
                R.drawable.read_more_collection,R.drawable.read_more_share,
                R.drawable.read_more_report,R.drawable.read_more_details,R.color.read_desc_font_color_day);
        ReadTheme.PayTheme payTheme = new ReadTheme.PayTheme(R.color.read_pay_desc_font_color_day,
                R.drawable.ugc_original_pic_default,R.drawable.ugc_original_pic_select,R.drawable.radius_attention_circle_red2,
                R.color.read_pay_btn_font_color_day,R.color.text_color_57,1.0f,
                R.drawable.radius_attention_circle_red_stroke,R.color.text_color_57);
        ReadTheme.BatteryTheme batteryTheme = new ReadTheme.BatteryTheme(R.drawable.read__electricity_1,
                R.drawable.read__electricity_2, R.drawable.read__electricity_3, R.drawable.read__electricity_4,
                R.drawable.read__electricity_5, R.drawable.read__electricity_6, R.drawable.read__electricity_c);
        ReadTheme.AutoPlayTheme autoPlayTheme = new ReadTheme.AutoPlayTheme(R.color.read_auto_play_title_font_color_day,
                R.color.read_auto_play_select_font_color_day,R.color.read_auto_play_unselect_font_color_day,
                R.color.read_auto_play_nomal_font_color_day,R.color.read_red_dot_bg_day);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        return new ReadTheme(type,R.color.read_menu_bg_color_day,R.drawable.read_theme_bg_1,
                R.color.read_content_font_color_day,R.color.read_title_font_color_day,R.color.read_status_bar_font_color_book_while,
                R.color.read_line_color_day,
                R.drawable.seekbar_style_read,R.drawable.read_process,topMenuTheme,
                bottomMenuTheme,secondMenuTheme,moreOperationTheme,themeSelectArray,
                R.drawable.read_selected,R.color.read_eyes_view_color,payTheme,1.0f,batteryTheme,
                autoPlayTheme,R.color.read_content_bg_color_day);

    }


    /**
     * 仿真黄旧纸质主题
     * @param type
     * @return
     */
    public static ReadTheme getThemeBookBuff(int type) {
        ReadTheme.TopMenuTheme topMenuTheme = new ReadTheme.TopMenuTheme(
                R.drawable.activity_new_back_buff,R.drawable.read_off_line_buff,
                R.drawable.read_gift_buff,R.drawable.read_other_more_buff);
        ReadTheme.BottomMenuTheme bottomMenuTheme = new ReadTheme.BottomMenuTheme(
                R.drawable.read_previous_chapter_buff,R.drawable.read_next_chapter_buff,
                R.drawable.read_catalog_buff,R.drawable.read_night_st_buff,
                R.drawable.read_setup_buff,R.drawable.read_scomment_buff,
                R.color.read_desc_font_color_buff,
                R.drawable.biankuang_novel_des_comment_buff,R.color.read_red_dot_font_color_buff);
        ReadTheme.SecondMenuTheme secondMenuTheme = new ReadTheme.SecondMenuTheme(
                R.drawable.read_brightness_reduce_buff,R.drawable.read_brightness_increase_buff,
                R.drawable.read_font_size_add_buff,R.drawable.read_font_size_sub_buff,
                R.drawable.read_flip_buff,R.drawable.read_eye_buff,
                R.drawable.read_play_buff,R.drawable.read_other_more_buff,
                R.color.read_desc_font_color_buff,1.0f,R.color.read_sys_light_select_font_color_buff,
                R.color.read_sys_light_unselect_font_color_buff,R.drawable.read_sys_light_bg_buff);
        ReadTheme.MoreOperationTheme moreOperationTheme = new ReadTheme.MoreOperationTheme(R.drawable.read_more_eject_buff,
                R.drawable.read_more_collection_st_buff,
                R.drawable.read_more_collection_buff,R.drawable.read_more_share_buff,
                R.drawable.read_more_report_buff,R.drawable.read_more_details_buff,R.color.read_desc_font_color_buff);
        ReadTheme.PayTheme payTheme = new ReadTheme.PayTheme(R.color.read_pay_desc_font_color_buff,
                R.drawable.ugc_original_pic_default_buff,R.drawable.ugc_original_pic_select_buff,R.drawable.radius_attention_circle_buff,
                R.color.read_pay_btn_font_color_buff,R.color.read_pay_other_price_font_color_buff,0.5f,
                R.drawable.radius_attention_circle_buff_stroke,R.color.read_pay_other_price_font_color_buff);
        ReadTheme.BatteryTheme batteryTheme = new ReadTheme.BatteryTheme(R.drawable.read__electricity_1,
                R.drawable.read__electricity_2, R.drawable.read__electricity_3, R.drawable.read__electricity_4,
                R.drawable.read__electricity_5, R.drawable.read__electricity_6, R.drawable.read__electricity_c);
        ReadTheme.AutoPlayTheme autoPlayTheme = new ReadTheme.AutoPlayTheme(R.color.read_auto_play_title_font_color_buff,
                R.color.read_auto_play_select_font_color_buff,R.color.read_auto_play_unselect_font_color_buff,
                R.color.read_auto_play_nomal_font_color_buff,R.color.read_red_dot_bg_buff);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        return new ReadTheme(type,R.color.read_menu_bg_color_buff,R.drawable.read_theme_bg_3,
                R.color.text_color_1,R.color.read_title_font_color_day,R.color.read_status_bar_font_color_book_buff,
                R.color.read_line_color_buff,
                R.drawable.seekbar_style_read_buff,R.drawable.read_process_buff,topMenuTheme,
                bottomMenuTheme,secondMenuTheme,moreOperationTheme,themeSelectArray,
                R.drawable.read_selected_buff,R.color.read_eyes_view_color,payTheme,1.0f,batteryTheme,
                autoPlayTheme,R.color.read_content_bg_color_buff);

    }


    /**
     * 浅红色主题
     * @param type
     * @return
     */
    public static ReadTheme getThemeRed(int type) {
        ReadTheme.TopMenuTheme topMenuTheme = new ReadTheme.TopMenuTheme(
                R.drawable.activity_new_back_red,R.drawable.read_off_line_red,
                R.drawable.read_gift_red,R.drawable.read_other_more_red);
        ReadTheme.BottomMenuTheme bottomMenuTheme = new ReadTheme.BottomMenuTheme(
                R.drawable.read_previous_chapter_red,R.drawable.read_next_chapter_red,
                R.drawable.read_catalog_red,R.drawable.read_night_st_red,
                R.drawable.read_setup_red,R.drawable.read_scomment_red,
                R.color.read_desc_font_color_red,
                R.drawable.biankuang_novel_des_comment_red,R.color.read_red_dot_font_color_red);
        ReadTheme.SecondMenuTheme secondMenuTheme = new ReadTheme.SecondMenuTheme(
                R.drawable.read_brightness_reduce_red,R.drawable.read_brightness_increase_red,
                R.drawable.read_font_size_add_red,R.drawable.read_font_size_sub_red,
                R.drawable.read_flip_red,R.drawable.read_eye_red,
                R.drawable.read_play_red,R.drawable.read_other_more_red,
                R.color.read_desc_font_color_red,1.0f,R.color.read_sys_light_select_font_color_red,
                R.color.read_sys_light_unselect_font_color_red,R.drawable.read_sys_light_bg_red);
        ReadTheme.MoreOperationTheme moreOperationTheme = new ReadTheme.MoreOperationTheme(R.drawable.read_more_eject_red,
                R.drawable.read_more_collection_st_red,
                R.drawable.read_more_collection_red,R.drawable.read_more_share_red,
                R.drawable.read_more_report_red,R.drawable.read_more_details_red,R.color.read_desc_font_color_red);
        ReadTheme.PayTheme payTheme = new ReadTheme.PayTheme(R.color.read_pay_desc_font_color_red,
                R.drawable.ugc_original_pic_default_red,R.drawable.ugc_original_pic_select_red,R.drawable.radius_attention_circle_red3,
                R.color.read_pay_btn_font_color_red,R.color.read_pay_other_price_font_color_red,0.5f,
                R.drawable.radius_attention_circle_pink_stroke,R.color.read_pay_other_price_font_color_red);
        ReadTheme.BatteryTheme batteryTheme = new ReadTheme.BatteryTheme(R.drawable.read__electricity_1_pink,
                R.drawable.read__electricity_2_pink, R.drawable.read__electricity_3_pink, R.drawable.read__electricity_4_pink,
                R.drawable.read__electricity_5_pink, R.drawable.read__electricity_6_pink, R.drawable.read__electricity_c_pink );
        ReadTheme.AutoPlayTheme autoPlayTheme = new ReadTheme.AutoPlayTheme(R.color.read_auto_play_title_font_color_red,
                R.color.read_auto_play_select_font_color_red,R.color.read_auto_play_unselect_font_color_red,
                R.color.read_auto_play_nomal_font_color_red,R.color.read_red_dot_bg_red);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        return new ReadTheme(type,R.color.read_menu_bg_color_red,R.color.read_content_bg_color_red,
                R.color.read_content_font_color_red,R.color.read_title_font_color_red,R.color.read_status_bar_font_color_red,
                R.color.read_line_color_red,
                R.drawable.seekbar_style_read_red,R.drawable.read_process_red,topMenuTheme,
                bottomMenuTheme,secondMenuTheme,moreOperationTheme,themeSelectArray,
                R.drawable.read_selected_red,R.color.read_eyes_view_color,payTheme,1.0f,batteryTheme,
                autoPlayTheme,R.color.read_content_bg_color_red);

    }

    /**
     * 仿真浅红纸质主题
     * @param type
     * @return
     */
    public static ReadTheme getThemeBookRed(int type) {
        ReadTheme.TopMenuTheme topMenuTheme = new ReadTheme.TopMenuTheme(
                R.drawable.activity_new_back_red,R.drawable.read_off_line_red,
                R.drawable.read_gift_red,R.drawable.read_other_more_red);
        ReadTheme.BottomMenuTheme bottomMenuTheme = new ReadTheme.BottomMenuTheme(
                R.drawable.read_previous_chapter_red,R.drawable.read_next_chapter_red,
                R.drawable.read_catalog_red,R.drawable.read_night_st_red,
                R.drawable.read_setup_red,R.drawable.read_scomment_red,
                R.color.read_desc_font_color_red,
                R.drawable.biankuang_novel_des_comment_red,R.color.read_red_dot_font_color_red);
        ReadTheme.SecondMenuTheme secondMenuTheme = new ReadTheme.SecondMenuTheme(
                R.drawable.read_brightness_reduce_red,R.drawable.read_brightness_increase_red,
                R.drawable.read_font_size_add_red,R.drawable.read_font_size_sub_red,
                R.drawable.read_flip_red,R.drawable.read_eye_red,
                R.drawable.read_play_red,R.drawable.read_other_more_red,
                R.color.read_desc_font_color_red,1.0f,R.color.read_sys_light_select_font_color_red,
                R.color.read_sys_light_unselect_font_color_red,R.drawable.read_sys_light_bg_red);
        ReadTheme.MoreOperationTheme moreOperationTheme = new ReadTheme.MoreOperationTheme(R.drawable.read_more_eject_red,
                R.drawable.read_more_collection_st_red,
                R.drawable.read_more_collection_red,R.drawable.read_more_share_red,
                R.drawable.read_more_report_red,R.drawable.read_more_details_red,R.color.read_desc_font_color_red);
        ReadTheme.PayTheme payTheme = new ReadTheme.PayTheme(R.color.read_pay_desc_font_color_red,
                R.drawable.ugc_original_pic_default_red,R.drawable.ugc_original_pic_select_red,R.drawable.radius_attention_circle_red3,
                R.color.read_pay_btn_font_color_red,R.color.read_pay_other_price_font_color_red,0.5f,
                R.drawable.radius_attention_circle_pink_stroke,R.color.read_pay_other_price_font_color_red);
        ReadTheme.BatteryTheme batteryTheme = new ReadTheme.BatteryTheme(R.drawable.read__electricity_1_pink,
                R.drawable.read__electricity_2_pink, R.drawable.read__electricity_3_pink, R.drawable.read__electricity_4_pink,
                R.drawable.read__electricity_5_pink, R.drawable.read__electricity_6_pink, R.drawable.read__electricity_c_pink );
        ReadTheme.AutoPlayTheme autoPlayTheme = new ReadTheme.AutoPlayTheme(R.color.read_auto_play_title_font_color_red,
                R.color.read_auto_play_select_font_color_red,R.color.read_auto_play_unselect_font_color_red,
                R.color.read_auto_play_nomal_font_color_red,R.color.read_red_dot_bg_red);
        SparseArray<Integer> themeSelectArray = new SparseArray<>();
        themeSelectArray.put(ThemeType.TYPE_AQUA,R.drawable.read_theme_color_1);
        themeSelectArray.put(ThemeType.TYPE_BLUE,R.drawable.read_theme_color_2);
        themeSelectArray.put(ThemeType.TYPE_BUFF,R.drawable.read_theme_color_3);
        themeSelectArray.put(ThemeType.TYPE_RED,R.drawable.read_theme_color_4);
        themeSelectArray.put(ThemeType.TYPE_DAY,R.drawable.read_background_white); //白天
        themeSelectArray.put(ThemeType.TYPE_BOOK_WHITE,R.drawable.read_background_whitesimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_BUFF,R.drawable.read_background_yellowsimulation);
        themeSelectArray.put(ThemeType.TYPE_BOOK_RED,R.drawable.read_background_pinksimulation);
        return new ReadTheme(type,R.color.read_menu_bg_color_red,R.drawable.read_theme_bg_2,
                R.color.read_content_font_color_red,R.color.read_title_font_color_red,R.color.read_status_bar_font_color_red,
                R.color.read_line_color_red,
                R.drawable.seekbar_style_read_red,R.drawable.read_process_red,topMenuTheme,
                bottomMenuTheme,secondMenuTheme,moreOperationTheme,themeSelectArray,
                R.drawable.read_selected_red,R.color.read_eyes_view_color,payTheme,1.0f,batteryTheme,
                autoPlayTheme,R.color.read_bg_transparent_red);

    }
}
